package com.redhipps.hips.client.widget;

import com.redhipps.hips.client.model.Context;
import com.redhipps.hips.client.model.Model;

/**
 * Interface to perform model editing tasks within a {@link ModelList}.
 * Since these tasks may require asynchronous user interaction, {@link ModelListEditCallback}s
 * are used to communicate the result of the operation to the model list.
 * 
 * TODO A way to query which operations are available.
 * 
 * @author yuhong
 */
@Deprecated
public interface ModelListEditDelegate<T extends Model> {  // TODO Generalize/rename

  void createModel(Context context, ModelListEditCallback<T> callback);

  void deleteModel(Context context, T model, ModelListEditCallback<T> callback);

  void editModel(Context context, T model, ModelListEditCallback<T> callback);

}
